From: Florian Müllner Date: Sat, 8 Feb 2025 01:23:23 +0000 (+0100) Subject: searchController: Adjust to `Clutter.Stage.get_key_focus()` change X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~153^2^2~42 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a8d4c679ebc9d302e526ca3d10c6775c43b1ee12;p=gnome-shell.git searchController: Adjust to `Clutter.Stage.get_key_focus()` change The method is now a plain getter of the `key-focus` property, so handle the case where it returns null. See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4256 Part-of: --- diff --git a/js/ui/searchController.js b/js/ui/searchController.js index 692cb1818..6dc65d643 100644 --- a/js/ui/searchController.js +++ b/js/ui/searchController.js @@ -186,9 +186,10 @@ export const SearchController = GObject.registerClass({ } _onStageKeyFocusChanged() { - let focus = global.stage.get_key_focus(); - let appearFocused = this._entry.contains(focus) || - this._searchResults.contains(focus); + const focus = global.stage.get_key_focus(); + const appearFocused = focus != null && + (this._entry.contains(focus) || + this._searchResults.contains(focus)); this._text.set_cursor_visible(appearFocused);